package com.ruoyi.project.channel.channelAccountGroup.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.channel.channelAccountGroup.mapper.ChannelAccountGroupMapper;
import com.ruoyi.project.channel.channelAccountGroup.domain.ChannelAccountGroup;
import com.ruoyi.project.channel.channelAccountGroup.service.IChannelAccountGroupService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 账号分组 服务层实现
 * 
 * @author CAIN
 * @date 2019-09-17
 */
@Service
public class ChannelAccountGroupServiceImpl implements IChannelAccountGroupService 
{
	@Autowired
	private ChannelAccountGroupMapper channelAccountGroupMapper;

	/**
     * 查询账号分组信息
     * 
     * @param groupId 账号分组ID
     * @return 账号分组信息
     */
    @Override
	public ChannelAccountGroup selectChannelAccountGroupById(Long groupId)
	{
	    return channelAccountGroupMapper.selectChannelAccountGroupById(groupId);
	}
	
	/**
     * 查询账号分组列表
     * 
     * @param channelAccountGroup 账号分组信息
     * @return 账号分组集合
     */
	@Override
	public List<ChannelAccountGroup> selectChannelAccountGroupList(ChannelAccountGroup channelAccountGroup)
	{
	    return channelAccountGroupMapper.selectChannelAccountGroupList(channelAccountGroup);
	}
	
    /**
     * 新增账号分组
     * 
     * @param channelAccountGroup 账号分组信息
     * @return 结果
     */
	@Override
	public int insertChannelAccountGroup(ChannelAccountGroup channelAccountGroup)
	{
	    return channelAccountGroupMapper.insertChannelAccountGroup(channelAccountGroup);
	}
	
	/**
     * 修改账号分组
     * 
     * @param channelAccountGroup 账号分组信息
     * @return 结果
     */
	@Override
	public int updateChannelAccountGroup(ChannelAccountGroup channelAccountGroup)
	{
	    return channelAccountGroupMapper.updateChannelAccountGroup(channelAccountGroup);
	}

	/**
     * 删除账号分组对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteChannelAccountGroupByIds(String ids)
	{
		return channelAccountGroupMapper.deleteChannelAccountGroupByIds(Convert.toStrArray(ids));
	}
	
}
